#include "..\..\std_lib_facilities.h"

int main()
{
	string input_fname1;
	string input_fname2;
	string out_fname;
	
	cout << "enter first input name\n";
	cin >> input_fname1;

	cout << "enter second input file name\n";
	cin >> input_fname2;

	ifstream ins1(input_fname1.c_str());
	if (!ins1) error("cannot read first file\n");
		
	ifstream ins2(input_fname2.c_str());
	if (!ins2) error("cannot read second file\n");

	cout << "enter output file name\n";
	cin >> out_fname;
	
	ofstream out(out_fname.c_str());
	if (!out) error("cannot read second file\n");
		
	
	char c;
	while (ins1.get(c))
		out << c;

	while (ins2.get(c))
		out << c;
	cout << "done...";
	return 0;
}